#include <iostream>
#include <vector>

using namespace std;

// 2138. 将字符串拆分为若干长度为 k 的组
// https://leetcode.cn/problems/divide-a-string-into-groups-of-size-k/?envType=daily-question&envId=2025-06-22

class Solution
{
public:
    vector<string> divideString(string s, int k, char fill)
    {
        vector<string> ans;
        string curStr;
        for (int i = 0; i < s.size(); i++)
        {
            curStr += s[i];
            if (i % k == (k - 1))
            {
                ans.push_back(curStr);
                curStr.clear();
            }
            if (i == s.size() - 1 && i % k != (k - 1))
            {
                while (i % k != (k - 1))
                {
                    curStr += fill;
                    i++;
                }
                ans.push_back(curStr);
            }
        }
        return ans;
    }
};

int main()
{
    return 0;
}